home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7957 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  48 lines

  1. Path: news.informatik.uni-muenchen.de!usenet
  2. From: Kurt Watzka <watzka@stat.uni-muenchen.de>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C prog needs help with win 3.1
  5. Date: Wed, 28 Feb 1996 15:31:48 +0100
  6. Organization: Institut fⁿr Statistik
  7. Message-ID: <31346754.354@stat.uni-muenchen.de>
  8. NNTP-Posting-Host: pc7.stat.uni-muenchen.de
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13.  
  14. John Dillworth wrote:
  15. > I need to insert a blank line between each printed line of text in this
  16. > Windows program fragment:
  17. >
  18.  
  19. [lots of lines with system specific stuff better asked in 
  20. comp.os.ms-windows.programmer.misc edited]
  21.  
  22. > Now in C I plain old ANSI C I would just put a couple of printf's with
  23. > newline characters.  This dosn't work with windows (this is c huh??  ;-) ).
  24.  
  25. So there you have your ANSI C answer: If you want blank lines 
  26. beween your lines
  27. in your programs output, insert additional newline characters.
  28.  
  29. Your question is not a question about the C programming 
  30. language, but the
  31. question you ask is not specific to any programming language. 
  32. Questions 
  33. like this should better go to comp.programming. But, let me 
  34. rephrase this
  35. question first:
  36.  
  37. How do I add two times dy to a variabe y in each iteration of a 
  38. loop instead of
  39. just dy?
  40.  
  41.    int i, y = 0, dy = 5;
  42.    for (i = 0; i < N; i++)
  43.       y += dy;
  44.            ^^ change this to "2 * dy" or make dy twice as big.
  45.  
  46. Kurt
  47.